import Request from './axios.js'

export default {
  // 获取城市id
  getLocationId (data) {
    return Request('get', '/v2/city/lookup', data)
  },
  // 获取热门城市
  getHotCity () {
    return Request('get', '/v2/city/top')
  },
  // 获取天气信息
  getWeather (data) {
    return Request('get', '/v7/weather/now', data)
  },
  // 三天天气预报
  getWeatherThreeDay (data) {
    return Request('get', '/v7/weather/3d', data)
  },
  // 七天天气预报(用不了)
  getWeatherSevenDay (data) {
    return Request('get', '/v7/weather/7d', data)
  },
  // 获取当天生活指数
  getIndices (data) {
    return Request('get', '/v7/indices/1d', data)
  },
  // 获取天气灾害预警
  getWarning (data) {
    return Request('get', '/v7/warning/now', data)
  },
  // 获取天气预警城市列表
  getWarningCityList (data) {
    return Request('get', '/v7/warning/list', data)
  },
  // 获取实时空气质量
  getAirQuality (data) {
    return Request('get', '/v7/air/now', data)
  },
  // 获取历史天气
  getHistoryWeather (data) {
    return Request('get', '/v7/historical/weather', data)
  },
  // 获取历史空气质量
  getHistoryAir (data) {
    return Request('get', '/v7/historical/air', data)
  }
}
